﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Management/manage.master" AutoEventWireup="true" CodeFile="List.aspx.cs" Inherits="Management_Orders_List" Theme="DataWebControls" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="true" EnableScriptLocalization="true" AsyncPostBackTimeout="36000">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <h2 class="clearfix">
                <span class="float_l">订单列表</span>
            </h2>
            <asp:Panel ID="Panel1" runat="server" CssClass="block">
                <span>选择品牌:</span>
                <asp:TextBox ID="txtOrderID" runat="server" CssClass="text"></asp:TextBox>
                <asp:LinkButton ID="lbtnSearch" runat="server" CssClass="btn" 
                    onclick="lbtnSearch_Click">查询</asp:LinkButton>
                <asp:LinkButton ID="lbtnTop10" runat="server" CssClass="btn" 
                    style="position:absolute;right:20px;" onclick="lbtnTop10_Click">商品销量排行</asp:LinkButton>
            </asp:Panel>
            <div class="margin10_tb">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" onrowcommand="GridView1_RowCommand">
                    <Columns>
                        <asp:TemplateField HeaderText="订单号">
                            <ItemTemplate>
                                <asp:Label ID="lblID" runat="server" Text='<%#Eval("OrderID").ToString() %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="商品">
                            <ItemTemplate>
                                <asp:Label ID="lblName" runat="server" Text='<%#HttpUtility.HtmlEncode(Eval("ProductName").ToString()) %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="购买数量">
                            <ItemTemplate>
                                <asp:Label ID="lblCount" runat="server" Text='<%#HttpUtility.HtmlEncode(Eval("Count").ToString()) %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="电话">
                            <ItemTemplate>
                                <asp:Label ID="lblPhone" runat="server" Text='<%#HttpUtility.HtmlEncode(Eval("Phone").ToString()) %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="QQ">
                            <ItemTemplate>
                                <asp:Label ID="lblQQ" runat="server" Text='<%#HttpUtility.HtmlEncode(Eval("QQ").ToString()) %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="邮箱">
                            <ItemTemplate>
                                <asp:Label ID="lblEmail" runat="server" Text='<%#HttpUtility.HtmlEncode(Eval("Email").ToString())%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="地址">
                            <ItemTemplate>
                                <asp:Label ID="lblAddress" runat="server" Text='<%#HttpUtility.HtmlEncode(Eval("Address").ToString()) %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="备注">
                            <ItemTemplate>
                                <asp:Label ID="lblMemo" runat="server" Text='<%#HttpUtility.HtmlEncode(Eval("Memo").ToString()) %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="尺寸">
                            <ItemTemplate>
                                <asp:Label ID="lblSizes" runat="server" Text='<%#HttpUtility.HtmlEncode(Eval("Sizes").ToString()) %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="颜色">
                            <ItemTemplate>
                                <asp:Label ID="lblColors" runat="server" Text='<%#HttpUtility.HtmlEncode(Eval("Colors").ToString()) %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="价格">
                            <ItemTemplate>
                                <asp:Label ID="lblPrice" runat="server" Text='<%#string.Format("{0:C}",Eval("Price").ToString()) %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="日期">
                            <ItemTemplate>
                                <asp:Label ID="lblDate" runat="server" Text='<%#Convert.ToDateTime(Eval("Date")).ToString("yyyy/MM/dd hh:mm") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:LinkButton ID="lbtnDelete" CommandName="DEL" runat="server" CssClass="btn" OnClientClick="javascript:return confirm('确认删除么？');">删除</asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <div class="pager margin10_tb">
                <asp:Repeater ID="rptPageFliper" runat="server">
                    <ItemTemplate>
                        <span class='<%#(((PageNumberItem)Container.DataItem).IsCurrentPage) ? "current": string.Empty%>' class="paging">
                            <asp:LinkButton ID="lbtnPager" runat="server" CommandName="<%# ((PageNumberItem)Container.DataItem).PageNumberCommand%>"
                                Text="<%# ((PageNumberItem)Container.DataItem).PageNumberText%>" Enabled='<%# !(((PageNumberItem)Container.DataItem).IsCurrentPage) %>'
                                Style='<%#(((PageNumberItem)Container.DataItem).IsCurrentPage) ? "color:#eee;": "color:#eee;"%>'
                                Font-Underline="false"></asp:LinkButton>
                        </span>
                    </ItemTemplate>
                </asp:Repeater>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

